<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        .d01{
            width: 100px;
            height: 100px;
            padding: 10px;
            margin: 0px;
            border: 1px solid red;
            box-sizing: border-box;
        }
        .d02{
            width: 100px;
            height: 100px;
            padding: 10px;
            margin: 0px;
            border: 1px solid blue;
            box-sizing: content-box;
        }
    </style>
</head>
<body>

<div class="d01"></div>
<div class="d02"></div>
</body>
</html>